﻿using Shop.Core.Share;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Shop.Core.Helper
{
    public static class UserHelper
    {
        /// <summary>
        /// 获取金额来源备注
        /// </summary>
        /// <param name="tpye">类型</param>
        /// <param name="money">金额</param>
        /// <param name="cateMoney">手续费</param>
        /// <returns></returns>
        public static string GetMemo(GlobalEnum.UserWalletSourceTypes tpye, decimal money, decimal cateMoney = 0)
        {
            var str = string.Empty;
            switch (tpye)
            {
                case GlobalEnum.UserWalletSourceTypes.Pay:
                    str = "消费了" + money + "元";
                    break;
                case GlobalEnum.UserWalletSourceTypes.Tocash:
                    str = "提现了" + money + "元";
                    break;
                case GlobalEnum.UserWalletSourceTypes.Distribution:
                    str = "收到佣金" + money + "元";
                    break;
                case GlobalEnum.UserWalletSourceTypes.Prize:
                    str = "收到销售奖励" + money + "元";
                    break;
                case GlobalEnum.UserWalletSourceTypes.Dividend:
                    str = "收到分红" + money + "元";
                    break;
                case GlobalEnum.UserWalletSourceTypes.Refund:
                    str = "收到了退款" + money + "元";
                    break;
            }
            return str;
        }
    }
}
